<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
TriangularDistribution (Commons Math 3.2 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="TriangularDistribution (Commons Math 3.2 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TriangularDistribution.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/TDistribution.html" title="class in org.apache.commons.math3.distribution"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/UniformIntegerDistribution.html" title="class in org.apache.commons.math3.distribution"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/commons/math3/distribution/TriangularDistribution.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="TriangularDistribution.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.commons.math3.distribution.AbstractRealDistribution">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.math3.distribution</FONT>
<BR>
Class TriangularDistribution</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html" title="class in org.apache.commons.math3.distribution">org.apache.commons.math3.distribution.AbstractRealDistribution</A>
      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.math3.distribution.TriangularDistribution</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/RealDistribution.html" title="interface in org.apache.commons.math3.distribution">RealDistribution</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>TriangularDistribution</B><DT>extends <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractRealDistribution</A></DL>
</PRE>

<P>
Implementation of the triangular real distribution.
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>3.0</DD>
<DT><B>Version:</B></DT>
  <DD>$Id: TriangularDistribution.java 1416643 2012-12-03 19:37:14Z tn $</DD>
<DT><B>See Also:</B><DD><a href="http://en.wikipedia.org/wiki/Triangular_distribution">
 Triangular distribution (Wikipedia)</a>, 
<A HREF="../../../../../serialized-form.html#org.apache.commons.math3.distribution.TriangularDistribution">Serialized Form</A></DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.apache.commons.math3.distribution.AbstractRealDistribution"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.apache.commons.math3.distribution.<A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractRealDistribution</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#random">random</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#randomData">randomData</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#SOLVER_DEFAULT_ABSOLUTE_ACCURACY">SOLVER_DEFAULT_ABSOLUTE_ACCURACY</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#TriangularDistribution(double, double, double)">TriangularDistribution</A></B>(double&nbsp;a,
                       double&nbsp;c,
                       double&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a triangular real distribution using the given lower limit,
 upper limit, and mode.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#TriangularDistribution(org.apache.commons.math3.random.RandomGenerator, double, double, double)">TriangularDistribution</A></B>(<A HREF="../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A>&nbsp;rng,
                       double&nbsp;a,
                       double&nbsp;c,
                       double&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a triangular distribution.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#cumulativeProbability(double)">cumulativeProbability</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X &lt;= x)</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#density(double)">density</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the probability density function (PDF) of this distribution
 evaluated at the specified point <code>x</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#getMode()">getMode</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the mode <code>c</code> of this distribution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#getNumericalMean()">getNumericalMean</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this method to get the numerical value of the mean of this
 distribution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#getNumericalVariance()">getNumericalVariance</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this method to get the numerical value of the variance of this
 distribution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#getSolverAbsoluteAccuracy()">getSolverAbsoluteAccuracy</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the solver absolute accuracy for inverse cumulative computation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#getSupportLowerBound()">getSupportLowerBound</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access the lower bound of the support.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#getSupportUpperBound()">getSupportUpperBound</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access the upper bound of the support.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#inverseCumulativeProbability(double)">inverseCumulativeProbability</A></B>(double&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes the quantile function of this distribution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#isSupportConnected()">isSupportConnected</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this method to get information about whether the support is connected,
 i.e. whether all values between the lower and upper bound of the support
 are included in the support.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#isSupportLowerBoundInclusive()">isSupportLowerBoundInclusive</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether or not the lower bound of support is in the domain of the density
 function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#isSupportUpperBoundInclusive()">isSupportUpperBoundInclusive</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether or not the upper bound of support is in the domain of the density
 function.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.commons.math3.distribution.AbstractRealDistribution"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.commons.math3.distribution.<A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractRealDistribution</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#cumulativeProbability(double, double)">cumulativeProbability</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#probability(double)">probability</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#probability(double, double)">probability</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#reseedRandomGenerator(long)">reseedRandomGenerator</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#sample()">sample</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#sample(int)">sample</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="TriangularDistribution(double, double, double)"><!-- --></A><H3>
TriangularDistribution</H3>
<PRE>
public <B>TriangularDistribution</B>(double&nbsp;a,
                              double&nbsp;c,
                              double&nbsp;b)
                       throws <A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</A>,
                              <A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</A></PRE>
<DL>
<DD>Creates a triangular real distribution using the given lower limit,
 upper limit, and mode.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - Lower limit of this distribution (inclusive).<DD><CODE>b</CODE> - Upper limit of this distribution (inclusive).<DD><CODE>c</CODE> - Mode of this distribution.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</A></CODE> - if <code>a &gt;= b</code> or if <code>c &gt; b</code>.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</A></CODE> - if <code>c &lt; a</code>.</DL>
</DL>
<HR>

<A NAME="TriangularDistribution(org.apache.commons.math3.random.RandomGenerator, double, double, double)"><!-- --></A><H3>
TriangularDistribution</H3>
<PRE>
public <B>TriangularDistribution</B>(<A HREF="../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A>&nbsp;rng,
                              double&nbsp;a,
                              double&nbsp;c,
                              double&nbsp;b)
                       throws <A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</A>,
                              <A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</A></PRE>
<DL>
<DD>Creates a triangular distribution.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>rng</CODE> - Random number generator.<DD><CODE>a</CODE> - Lower limit of this distribution (inclusive).<DD><CODE>b</CODE> - Upper limit of this distribution (inclusive).<DD><CODE>c</CODE> - Mode of this distribution.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</A></CODE> - if <code>a &gt;= b</code> or if <code>c &gt; b</code>.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</A></CODE> - if <code>c &lt; a</code>.<DT><B>Since:</B></DT>
  <DD>3.1</DD>
</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getMode()"><!-- --></A><H3>
getMode</H3>
<PRE>
public double <B>getMode</B>()</PRE>
<DL>
<DD>Returns the mode <code>c</code> of this distribution.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the mode <code>c</code> of this distribution</DL>
</DD>
</DL>
<HR>

<A NAME="getSolverAbsoluteAccuracy()"><!-- --></A><H3>
getSolverAbsoluteAccuracy</H3>
<PRE>
protected double <B>getSolverAbsoluteAccuracy</B>()</PRE>
<DL>
<DD>Returns the solver absolute accuracy for inverse cumulative computation.
 You can override this method in order to use a Brent solver with an
 absolute accuracy different from the default.

 <p>
 For this distribution, the returned value is not really meaningful,
 since exact formulas are implemented for the computation of the
 <A HREF="../../../../../org/apache/commons/math3/distribution/TriangularDistribution.html#inverseCumulativeProbability(double)"><CODE>inverseCumulativeProbability(double)</CODE></A> (no solver is invoked).
 </p>
 <p>
 For lower limit <code>a</code> and upper limit <code>b</code>, the current
 implementation returns <code>max(ulp(a), ulp(b)</code>.
 </p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#getSolverAbsoluteAccuracy()">getSolverAbsoluteAccuracy</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractRealDistribution</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the maximum absolute error in inverse cumulative probability estimates</DL>
</DD>
</DL>
<HR>

<A NAME="density(double)"><!-- --></A><H3>
density</H3>
<PRE>
public double <B>density</B>(double&nbsp;x)</PRE>
<DL>
<DD>Returns the probability density function (PDF) of this distribution
 evaluated at the specified point <code>x</code>. In general, the PDF is
 the derivative of the <A HREF="../../../../../org/apache/commons/math3/distribution/RealDistribution.html#cumulativeProbability(double)"><CODE>CDF</CODE></A>.
 If the derivative does not exist at <code>x</code>, then an appropriate
 replacement should be returned, e.g. <code>Double.POSITIVE_INFINITY</code>,
 <code>Double.NaN</code>, or  the limit inferior or limit superior of the
 difference quotient.

 For lower limit <code>a</code>, upper limit <code>b</code> and mode <code>c</code>, the
 PDF is given by
 <ul>
 <li><code>2 * (x - a) / [(b - a) * (c - a)]</code> if <code>a &lt;= x &lt; c</code>,</li>
 <li><code>2 / (b - a)</code> if <code>x = c</code>,</li>
 <li><code>2 * (b - x) / [(b - a) * (b - c)]</code> if <code>c &lt; x &lt;= b</code>,</li>
 <li><code>0</code> otherwise.
 </ul>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the point at which the PDF is evaluated
<DT><B>Returns:</B><DD>the value of the probability density function at point <code>x</code></DL>
</DD>
</DL>
<HR>

<A NAME="cumulativeProbability(double)"><!-- --></A><H3>
cumulativeProbability</H3>
<PRE>
public double <B>cumulativeProbability</B>(double&nbsp;x)</PRE>
<DL>
<DD>For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X &lt;= x)</code>. In other
 words, this method represents the (cumulative) distribution function
 (CDF) for this distribution.

 For lower limit <code>a</code>, upper limit <code>b</code> and mode <code>c</code>, the
 CDF is given by
 <ul>
 <li><code>0</code> if <code>x &lt; a</code>,</li>
 <li><code>(x - a)^2 / [(b - a) * (c - a)]</code> if <code>a &lt;= x &lt; c</code>,</li>
 <li><code>(c - a) / (b - a)</code> if <code>x = c</code>,</li>
 <li><code>1 - (b - x)^2 / [(b - a) * (b - c)]</code> if <code>c &lt; x &lt;= b</code>,</li>
 <li><code>1</code> if <code>x &gt; b</code>.</li>
 </ul>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the point at which the CDF is evaluated
<DT><B>Returns:</B><DD>the probability that a random variable with this
 distribution takes a value less than or equal to <code>x</code></DL>
</DD>
</DL>
<HR>

<A NAME="getNumericalMean()"><!-- --></A><H3>
getNumericalMean</H3>
<PRE>
public double <B>getNumericalMean</B>()</PRE>
<DL>
<DD>Use this method to get the numerical value of the mean of this
 distribution.

 For lower limit <code>a</code>, upper limit <code>b</code>, and mode <code>c</code>,
 the mean is <code>(a + b + c) / 3</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the mean or <code>Double.NaN</code> if it is not defined</DL>
</DD>
</DL>
<HR>

<A NAME="getNumericalVariance()"><!-- --></A><H3>
getNumericalVariance</H3>
<PRE>
public double <B>getNumericalVariance</B>()</PRE>
<DL>
<DD>Use this method to get the numerical value of the variance of this
 distribution.

 For lower limit <code>a</code>, upper limit <code>b</code>, and mode <code>c</code>,
 the variance is <code>(a^2 + b^2 + c^2 - a * b - a * c - b * c) / 18</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the variance (possibly <code>Double.POSITIVE_INFINITY</code> as
 for certain cases in <A HREF="../../../../../org/apache/commons/math3/distribution/TDistribution.html" title="class in org.apache.commons.math3.distribution"><CODE>TDistribution</CODE></A>) or <code>Double.NaN</code> if it
 is not defined</DL>
</DD>
</DL>
<HR>

<A NAME="getSupportLowerBound()"><!-- --></A><H3>
getSupportLowerBound</H3>
<PRE>
public double <B>getSupportLowerBound</B>()</PRE>
<DL>
<DD>Access the lower bound of the support. This method must return the same
 value as <code>inverseCumulativeProbability(0)</code>. In other words, this
 method must return
 <p><code>inf {x in R | P(X <= x) > 0}</code>.</p>

 The lower bound of the support is equal to the lower limit parameter
 <code>a</code> of the distribution.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>lower bound of the support</DL>
</DD>
</DL>
<HR>

<A NAME="getSupportUpperBound()"><!-- --></A><H3>
getSupportUpperBound</H3>
<PRE>
public double <B>getSupportUpperBound</B>()</PRE>
<DL>
<DD>Access the upper bound of the support. This method must return the same
 value as <code>inverseCumulativeProbability(1)</code>. In other words, this
 method must return
 <p><code>inf {x in R | P(X <= x) = 1}</code>.</p>

 The upper bound of the support is equal to the upper limit parameter
 <code>b</code> of the distribution.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>upper bound of the support</DL>
</DD>
</DL>
<HR>

<A NAME="isSupportLowerBoundInclusive()"><!-- --></A><H3>
isSupportLowerBoundInclusive</H3>
<PRE>
public boolean <B>isSupportLowerBoundInclusive</B>()</PRE>
<DL>
<DD>Whether or not the lower bound of support is in the domain of the density
 function.  Returns true iff <code>getSupporLowerBound()</code> is finite and
 <code>density(getSupportLowerBound())</code> returns a non-NaN, non-infinite
 value.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>true if the lower bound of support is finite and the density
 function returns a non-NaN, non-infinite value there</DL>
</DD>
</DL>
<HR>

<A NAME="isSupportUpperBoundInclusive()"><!-- --></A><H3>
isSupportUpperBoundInclusive</H3>
<PRE>
public boolean <B>isSupportUpperBoundInclusive</B>()</PRE>
<DL>
<DD>Whether or not the upper bound of support is in the domain of the density
 function.  Returns true iff <code>getSupportUpperBound()</code> is finite and
 <code>density(getSupportUpperBound())</code> returns a non-NaN, non-infinite
 value.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>true if the upper bound of support is finite and the density
 function returns a non-NaN, non-infinite value there</DL>
</DD>
</DL>
<HR>

<A NAME="isSupportConnected()"><!-- --></A><H3>
isSupportConnected</H3>
<PRE>
public boolean <B>isSupportConnected</B>()</PRE>
<DL>
<DD>Use this method to get information about whether the support is connected,
 i.e. whether all values between the lower and upper bound of the support
 are included in the support.

 The support of this distribution is connected.
<P>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code></DL>
</DD>
</DL>
<HR>

<A NAME="inverseCumulativeProbability(double)"><!-- --></A><H3>
inverseCumulativeProbability</H3>
<PRE>
public double <B>inverseCumulativeProbability</B>(double&nbsp;p)
                                    throws <A HREF="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</A></PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#inverseCumulativeProbability(double)">AbstractRealDistribution</A></CODE></B></DD>
<DD>Computes the quantile function of this distribution. For a random
 variable <code>X</code> distributed according to this distribution, the
 returned value is
 <ul>
 <li><code>inf{x in R | P(X<=x) >= p}</code> for <code>0 &lt; p &lt;= 1</code>,</li>
 <li><code>inf{x in R | P(X<=x) > 0}</code> for <code>p = 0</code>.</li>
 </ul>

 The default implementation returns
 <ul>
 <li><A HREF="../../../../../org/apache/commons/math3/distribution/RealDistribution.html#getSupportLowerBound()"><CODE>RealDistribution.getSupportLowerBound()</CODE></A> for <code>p = 0</code>,</li>
 <li><A HREF="../../../../../org/apache/commons/math3/distribution/RealDistribution.html#getSupportUpperBound()"><CODE>RealDistribution.getSupportUpperBound()</CODE></A> for <code>p = 1</code>.</li>
 </ul>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/RealDistribution.html#inverseCumulativeProbability(double)">inverseCumulativeProbability</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/RealDistribution.html" title="interface in org.apache.commons.math3.distribution">RealDistribution</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html#inverseCumulativeProbability(double)">inverseCumulativeProbability</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractRealDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractRealDistribution</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - the cumulative probability
<DT><B>Returns:</B><DD>the smallest <code>p</code>-quantile of this distribution
 (largest 0-quantile for <code>p = 0</code>)
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</A></CODE> - if <code>p &lt; 0</code> or <code>p &gt; 1</code></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TriangularDistribution.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/TDistribution.html" title="class in org.apache.commons.math3.distribution"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/UniformIntegerDistribution.html" title="class in org.apache.commons.math3.distribution"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/commons/math3/distribution/TriangularDistribution.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="TriangularDistribution.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.commons.math3.distribution.AbstractRealDistribution">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2003-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
